<template>
    <div>
        <input placeholder="Hellow Button" v-model="inputV"/>
        <button @click="alertFun">alert input</button>
    </div>
</template>

<script setup>
import {ref} from "vue";

const inputV = ref('');

function alertFun() {
    let msg = inputV.value;
    if (!msg) {
        msg = 'Hellow Button';
    }
    alert(msg);
}
</script>

<style scoped>
</style>